"""
@Project ：Python_learning 
@File    ：125.验证回文字符串.py
@Author  ：zhupp
@Date    ：2024/12/20 16:43 
"""

class Solution:
    def isPalindrome(self, s: str) -> bool:
        filter_s = [char.lower() for char in s if char.isalnum() or char.isalpha()]
        if filter_s[::-1] == filter_s:
            return True
        else:
            return False

s = Solution()
print(s.isPalindrome("A123  aa32 1a"))